package info.nene_loveplus.controller;

import info.nene_loveplus.model.blog.Comment;
import info.nene_loveplus.model.blog.Entry;

import java.util.List;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;

public class CommentListController extends Controller {

	@Override
	public Navigation run() throws Exception {

		List<Entry> list = Datastore.query(Entry.class).asList();
		requestScope("list", list);

		List<Comment> comments = Datastore.query(Comment.class).asList();
		requestScope("comments", comments);

		return forward("commentList.jsp");
	}
}
